import 'package:flutter/material.dart';
import 'package:flutter_app/widget/BannerWidget.dart';
import 'package:flutter_app/widget/VideoWidget.dart';
import 'package:flutter_app/page/player/PlayerDetail.dart';

//探秘视频
class CompanyHome extends StatefulWidget {
  @override
  State<StatefulWidget> createState() => CompanyHomeState();
}

class CompanyHomeState extends State<CompanyHome> {
  List<String> imgList = [
    "http://ww4.sinaimg.cn/large/006uZZy8jw1faic21363tj30ci08ct96.jpg",
    "http://ww4.sinaimg.cn/large/006uZZy8jw1faic259ohaj30ci08c74r.jpg",
    "http://ww4.sinaimg.cn/large/006uZZy8jw1faic2b16zuj30ci08cwf4.jpg",
  ];

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return new Container(
      margin: EdgeInsets.fromLTRB(20, 0, 20, 20),
      child: ListView(
        children: <Widget>[
          BannerWidget(imgPath: imgList, aspectRatio: 1.5, height: 200.0),
          GestureDetector(
            behavior: HitTestBehavior.translucent,
            child: VideoWidget(
              icon: "images/ic_head.jpg",
              title: "三个月让员工胖十斤的神仙餐厅到底长啥样？",
              source: "北极星电力网",
              aspectRatio: 1.2,
              height: 120.0,
              isShowSpecail: true,
            ),
            onTap: () {
              print("我被点击了");
              Navigator.push(
                  context,
                  new MaterialPageRoute(
                      builder: (context) => new PlayerDetail()));
            },
          ),
          Container(
            child: Column(
              children: <Widget>[
                Row(
                  mainAxisAlignment: MainAxisAlignment.spaceAround,
                  children: <Widget>[
                    new Expanded(
                      child: Container(
                        padding: EdgeInsets.fromLTRB(0, 10, 5, 0),
                        child: VideoWidget(
                            icon: "images/ic_head.jpg",
                            title: "三个月让员工胖十斤的神仙餐厅到底长啥样？",
                            source: "北极星电力网",
                            aspectRatio: 1.2,
                            height: 120.0,
                            isShowSpecail: false),
                      ),
                    ),
                    new Expanded(
                      child: Container(
                        padding: EdgeInsets.fromLTRB(5, 10, 0, 0),
                        child: VideoWidget(
                            icon: "images/ic_head.jpg",
                            title: "三个月让员工胖十斤的神仙餐厅到底长啥样？",
                            source: "北极星电力网",
                            aspectRatio: 1.2,
                            height: 120.0,
                            isShowSpecail: false),
                      ),
                    ),
                  ],
                ),
                Row(
                  mainAxisAlignment: MainAxisAlignment.spaceAround,
                  children: <Widget>[
                    new Expanded(
                      child: Container(
                        padding: EdgeInsets.fromLTRB(0, 10, 5, 0),
                        child: VideoWidget(
                            icon: "images/ic_head.jpg",
                            title: "三个月让员工胖十斤的神仙餐厅到底长啥样？",
                            source: "北极星电力网",
                            aspectRatio: 1.2,
                            height: 120.0,
                            isShowSpecail: false),
                      ),
                    ),
                    new Expanded(
                      child: Container(
                        padding: EdgeInsets.fromLTRB(5, 10, 0, 0),
                        child: VideoWidget(
                            icon: "images/ic_head.jpg",
                            title: "三个月让员工胖十斤的神仙餐厅到底长啥样？",
                            source: "北极星电力网",
                            aspectRatio: 1.2,
                            height: 120.0,
                            isShowSpecail: false),
                      ),
                    ),
                  ],
                ),
                Row(
                  mainAxisAlignment: MainAxisAlignment.spaceAround,
                  children: <Widget>[
                    new Expanded(
                      child: Container(
                        padding: EdgeInsets.fromLTRB(0, 10, 5, 0),
                        child: VideoWidget(
                            icon: "images/ic_head.jpg",
                            title: "三个月让员工胖十斤的神仙餐厅到底长啥样？",
                            source: "北极星电力网",
                            aspectRatio: 1.2,
                            height: 120.0,
                            isShowSpecail: false),
                      ),
                    ),
                    new Expanded(
                      child: Container(
                        padding: EdgeInsets.fromLTRB(5, 10, 0, 0),
                        child: VideoWidget(
                            icon: "images/ic_head.jpg",
                            title: "三个月让员工胖十斤的神仙餐厅到底长啥样？",
                            source: "北极星电力网",
                            aspectRatio: 1.2,
                            height: 120.0,
                            isShowSpecail: false),
                      ),
                    ),
                  ],
                ),
                Row(
                  mainAxisAlignment: MainAxisAlignment.spaceAround,
                  children: <Widget>[
                    new Expanded(
                      child: Container(
                        padding: EdgeInsets.fromLTRB(0, 10, 5, 0),
                        child: VideoWidget(
                            icon: "images/ic_head.jpg",
                            title: "三个月让员工胖十斤的神仙餐厅到底长啥样？",
                            source: "北极星电力网",
                            aspectRatio: 1.2,
                            height: 120.0,
                            isShowSpecail: false),
                      ),
                    ),
                    new Expanded(
                      child: Container(
                        padding: EdgeInsets.fromLTRB(5, 10, 0, 0),
                        child: VideoWidget(
                            icon: "images/ic_head.jpg",
                            title: "三个月让员工胖十斤的神仙餐厅到底长啥样？",
                            source: "北极星电力网",
                            aspectRatio: 1.2,
                            height: 120.0,
                            isShowSpecail: false),
                      ),
                    ),
                  ],
                ),
              ],
            ),
          )
        ],
      ),
    );
  }
}
